#!/bin/sh

pushd $(dirname $0)

key_file=rsa_id

rm $key_file*

ssh-keygen -t rsa -f $key_file -N ""

if [ ! -d ~/.ssh ]; then
  mkdir ~/.ssh
fi

cat $key_file.pub > ~/.ssh/authorized_keys

rm $key_file.pub

mv $key_file ~/.ssh/

popd
